package cn.edu.ecut.socket;

import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;

public class FirstClient {

	public static void main(String[] args) throws IOException {
		
		Socket s = new Socket();
		
		// 根据字符串指定的IP地址返回其对应的InetAddress实例
		InetAddress address = InetAddress.getByName( "1.0.0.99" );
		final int port = 5555 ; // 指定端口号
		SocketAddress remote = new InetSocketAddress( address , port) ;
		
		s.connect( remote );
		
		s.close();

	}

}
